package edu.sandau.f210153.f21010536.service;

import edu.sandau.f210153.f21010536.model.School;
import edu.sandau.f210153.f21010536.repository.SchoolRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class SchoolService {
    @Autowired
    private SchoolRepository schoolRepository;
    public void delete(Long id){
        schoolRepository.deleteById(id);
    }
    public void save(School d){schoolRepository.save(d);}
    public School get(Long id){
        return schoolRepository.getReferenceById(id);
    }
}
